package object;

public class ObjectDemo {
    public static void main(String[] args) {
        String s1 = new String("string");
        String s2 = new String("string");

        System.out.println(s1.equals(s2));

        StringBuilder builder = new StringBuilder("hello");
        StringBuilder builder2 = new StringBuilder("hello");

        System.out.println(builder.equals(builder2));




        /**
         * 调用object类的equals（），内部还是在使用==比较地址，没有参考意义
         * 重写equals
         *//*
        Point a = new Point(100,200);
        Point b = new Point(100,200);
        System.out.println(a == b);
        System.out.println(a.equals(b));*/





   /* Aoo o1 = new Aoo();
    Object o2 = new Aoo();
    Point t = new Point(100,200);
    System.out.println(o2);
    System.out.println(o2.toString());
    System.out.println(t);
    System.out.println(t.toString());


*/
    }
}
class Aoo{

}
class Boo{

}
